import 'package:flutter/material.dart';

class Dfor<T> extends StatelessWidget {
  const Dfor({this.list, this.builder, Key key}) : super(key: key);

  final List<T> list;
  final Function builder;

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: ListView(
        children: list.map<Widget>((item) {
          return builder(item);
        }).toList(),
      ),
    );
  }
}